<div class="modal hide fade" id="scaffoldEdit">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">×</button>
        <h3>Edit</h3>
    </div>
    <div class="modal-body">
        <form class="form-horizontal" id="form-modify">
            <div class="control-group">
                <?php foreach($columns as $column_name => $info){?>
                    <label class="control-label">
                        <?php echo $column_name;?> [<?php echo $info['COLUMN_COMMENT'];?>]
                    </label>
                    <div class="controls">
                        <?php if ($column_name == $primary){?>
                        <input class="input-xlarge disabled" id="focusedInput" type="text" name="<?php echo $column_name;?>" value="">
                        <?php }else{?>
                            <?php if ($info['COLUMN_TYPE'] == 'text'){?>
                                <textarea class="input-xlarge" id="textarea2" name="<?php echo $column_name;?>" rows="3"></textarea>
                            <?php }else{?>
                        <input class="input-xlarge focused" id="focusedInput" type="text" name="<?php echo $column_name;?>" value="">
                            <?php }?>
                        <?php }?>
                    </div>
                    <br />
                <?php }?>
            </div>
        </form>

    </div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">Close</a>
        <a href="#" class="btn btn-primary btn-modify">Save changes</a>
    </div>
</div>